# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>

buildarch=8

pkgname=meson-tools
pkgver=r32.0a02e2d
pkgrel=1
arch=('aarch64')
pkgdesc="Amlogic Meson tools"
url="https://github.com/afaerber/meson-tools"
license=('GPL2')
depends=('openssl')
makedepends=('git')
source=('git+https://github.com/afaerber/meson-tools.git')
md5sums=('SKIP')

pkgver() {
  cd ${pkgname}
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd ${pkgname}
  make
}

package() {
  cd ${pkgname}
  install -d "${pkgdir}/usr/bin"
  install -m755 amlbootenc-gxl amlbootsig{,-gxl} amlbootimg-gxl amlinfo unamlbootsig "${pkgdir}/usr/bin"
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
